package spring.batch.helloworld;

import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.annotation.AfterJob;
import org.springframework.batch.core.annotation.BeforeJob;

/**
 * @Author: huhx
 * @Date: 2017-11-02 上午 8:50
 */
public class JobExecListener {

    @BeforeJob
    public void beforeJob(JobExecution jobExecution) {
        System.out.println("before start time: " + jobExecution.getStartTime());
    }

    @AfterJob
    public void afterJob(JobExecution jobExecution) {
        System.out.println("after end time: " + jobExecution.getEndTime());
    }
}
